﻿<div ng-controller="ventasController">
    <form ng-submit="save()">
        <div class="table-responsive">
            <h3>NUEVO REGISTRO DE VENTAS</h3>
            <table class="table table-bordered table-striped">
                
                <tr>
                    <td>Serie:<input type="text" ng-model="ventas.serie" /></td>
                    <td>Fecha Venta:<input type="date" ng-model="ventas.fechaVenta" /></td>
                    <td>Numero de Documento:<input type="number" ng-model="ventas.numDoc" /></td>
                    <td>IdTrabajador:<input type="text" ng-model="ventas.idTrabajador" /></td>
                    <td><button class="bnt btn-primary" type="submit">Save</button></td>
                </tr>
            </table>
        </div>  
    </form>
    <div class="table-responsive">
        <h3>LISTA DE  REGISTROS</h3>

        <table class="table table-bordered table-striped">

            <tr>
                <th>Serie</th>
                <th>Fecha de venta</th>
                <th> Numero de documento</th>
                <th> IdTrabajador</th>
            </tr>
            <tr ng-repeat="d in ventass">
                <td>{{d.serie}}</td>
                <td>{{d.numDoc}}</td>
                <td>{{d.fechaVenta}}</td>
                <td>{{d.idTrabajador}}</td>
                <td>
                    <a href="" ng-click="delete(d.id)">x</a>
                    <a href="" ng-click="selec(d)">Select</a>
                </td>
            </tr>
        </table>
    </div>
</div>